{% extends 'order/base.html' %}

{% block body %}

<div class="border_top_cart">
    <div class="container">
        <div class="checkout-box">
            <form id="checkoutForm" action="#" method="post">

                <div class="checkout-box-ft">
                    <div id="checkoutGoodsList" class="checkout-goods-box">
                        <div class="xm-box">
                            <div class="box-hd">
                                <h2 class="title">确认订单信息</h2>
                            </div>
                            <div class="box-bd">
                                <dl class="checkout-goods-list">
                                    <dt class="clearfix">
                                        <span class="col col-1">商品名称</span>
                                        <span class="col col-2">购买价格</span>
                                        <span class="col col-3">购买数量</span>
                                        <span class="col col-4">小计（元）</span>
                                    </dt>

                                    {% set total = 0 %}
                                    {% for order in orders %}
                                    <dd class="item clearfix">
                                        <div class="item-row">
                                            <div class="col col-1">
                                                <div class="g-pic">
                                                    <img src="{{ order['image'] }}"
                                                         srcset="http://i1.mifile.cn/a1/T11lLgB5YT1RXrhCrK!80x80.jpg 2x"
                                                         width="40" height="40">
                                                </div>
                                                <div class="g-info">{% raw order['name'] %}</div>
                                            </div>

                                            <div class="col col-2">{{ order['price'] }}元</div>
                                            <div class="col col-3">{{ order['nums'] }}</div>
                                            <div class="col col-4">{{ cal_total(order) }}元</div>
                                            {{ total = cal_total(order)+total }}
                                        </div>
                                    </dd>
                                    {% end %}
                                </dl>
                                <div class="checkout-count clearfix">

                                    <div class="checkout-price">
                                        <ul>
                                            <li>
                                                订单总额：<span>{{ total }}元</span>
                                            </li>
                                            <li>
                                                运费：<span id="postageDesc">0元</span>
                                            </li>
                                        </ul>
                                        <p class="checkout-total">应付总额：<span><strong
                                                id="totalPrice">{{ total }}</strong>元</span></p>
                                    </div>
                                    <!--  -->
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>

    </div>
</div>


{% end %}